import request from '@/utils/request'

export default {
  // 添加数据
  addEventInfo(historyEvent) {
    return request({
      url: '/visualization/historyevent/addEventInfo',
      method: 'post',
      data: historyEvent
    })
  },

  // 查询基本信息
  getEventInfo(eventId) {
    return request({
      url: `/visualization/historyevent/getEventInfo/${eventId}`,
      method: 'get'
    })
  },

  // 更新基本信息 对象中需要包含 id
  updateEventInfo(historyEvent) {
    return request({
      url: '/visualization/historyevent/updateEventInfo',
      method: 'post',
      data: historyEvent
    })
  },

  // 保存或者更新事件经过的描述
  saveOrUpdateDesc(eventDesc) {
    return request({
      url: '/visualization/historyevent/saveOrUpdateDesc',
      method: 'post',
      data: eventDesc
    })
  },

  // 获取事件的描述
  getDescInfo(eventId) {
    return request({
      url: `/visualization/historyevent/getDescInfo/${eventId}`,
      method: 'get'
    })
  },

  // 保存或者更新事件总结信息
  saveOrUpdateSummary(summaryInfo) {
    return request({
      url: '/visualization/historyevent/saveOrUpdateSummary',
      method: 'post',
      data: summaryInfo
    })
  },

  // 获取事件的总结信息
  getSummaryInfo(summaryId) {
    return request({
      url: `/visualization/historyevent/getSummaryInfo/${summaryId}`,
      method: 'get'
    })
  },
  // 分页查询事件
  pageEventCondition(current, limit, eventQuery) {
    return request({
      url: `/visualization/historyevent/pageEventCondition/${current}/${limit}`,
      method: 'post',
      data: eventQuery
    })
  },

    // 获取事件的总结信息
    deleteEvent(eventId) {
      return request({
        url: `/visualization/historyevent/deleteEvent/${eventId}`,
        method: 'delete'
      })
    },


}
